function Loader()
{
	this.signal = new Signal()
	this._xhr = new XMLHttpRequest();
}

	Loader.LOAD_COMPLETE = "loadComplete";
	
	Loader.prototype.signal = null;
	Loader.prototype._xhr	= null;
	Loader.prototype._data	= null;
	
	Loader.prototype.load = function( p_url, p_async )
	{
		var _this = this;
		p_async = p_async || false;
		
		this._xhr.onreadystatechange = function()
		{
			_this.completeHandler();
		};
		
		this._xhr.open( "GET", p_url, p_async );
		this._xhr.send(null);
	};
	
	
	Loader.prototype.completeHandler = function()
	{
		if( this._xhr.readyState == 4 )
		{
			this._data = this._xhr.responseText;
			this.signal.dispatchEvent( Loader.LOAD_COMPLETE );
		}
	};
	
	Loader.prototype.getData = function()
	{
		return this._data;
	};
